In software defined networking (SDN), a control plane is separated from a forwarding plane. The control plane defines a routing policy based on an entire network, and the forwarding plane processes a data packet according to the received routing policy. In a process in which a host initiates a request, the host requests an OpenFlow switch (OFS) to report a data packet to an OpenFlow controller (OFC). After completing corresponding logic, the OFC delivers flow entries to N OFSs on corresponding path in response to the request.
Two problems may occur in the process. First, in a time period from a time when the host initiates the request to a time when a corresponding flow entry takes effect in the first OFS connected to the host, M repeated requests may be reported. An OFC end processes the M repeated requests with no difference, performs calculation M times, and delivers M repeated flow entries to the N OFSs on the path. Second, in a process in which the OFC delivers flow entries to the N OFSs on the path, because a time of network transmission from the OFC to each OFS and a time when an instruction of the flow entry takes effect on each OFS are inconsistent, a problem of repeatedly reporting a data packet on different OFSs on the path still occurs after the OFC delivers the flow entry to the OFSs on the path, and the OFC still performs repeated calculation one or more times.
A current solution is that, a cache is set at an OFS end. For repeated packets in a period of time, a switch reports and processes only the first repeated packet; when an OFC delivers a flow entry, the switch then forwards corresponding same batch of data packets in the cache. This solution is applicable only to a repeated packet reported by the first OFS on a routing policy path, and is not applicable to a repeated packet reported by another OFS on the routing policy path, which still results in an increase in an amount of repeated calculation of the OFC and delivery of a large quantity of repeated flow entries.